<%@ page import="com.lbw.model.Student" %><%--
  Created by IntelliJ IDEA.
  User: lbw
  Date: 2021/4/1
  Time: 9:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>StudentInfo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css">

</head>
<body>

<table>
    <caption>Student Information</caption>
    <thead>
    <tr>
        <th scope="col">Name</th>
        <th scope="col">StudentId</th>
        <th scope="col">Class</th>
        <th scope="col">Sex</th>
        <th scope="col">Age</th>
        <th scope="col">Major</th>
        <th scope="col">Kind</th>

    </tr>
    </thead>
    <%--    <tfoot>
        <tr>
            <td colspan="3">Data is updated every 15 minutes.
            </td>

        </tr>
        </tfoot>--%>
    <tbody>
    <tr>
        <%--<td scope="row"><%=stu.getName()%>
        </td>
        <td><%=stu.getStuId()%>
        </td>
        <td><%=stu.getClazz()%>
        </td>--%>
        <td scope="row">${requestScope.stu.name}
        </td>
        <td>${requestScope.stu.stuId}
        </td>
        <td>${requestScope.stu.clazz}
        </td>
        <c:if test="${requestScope.stu.sex eq 'male'}">
            <td>男</td>
        </c:if>
        <c:if test="${ requestScope.stu.sex eq 'female'}">
            <td>女</td>
        </c:if>
        <td>${requestScope.stu.age}
        </td>
        <td>${requestScope.stu.major}
        </td>
        <td>${requestScope.stu.kind}
        </td>
    </tr>
    <c:forEach items="${requestScope.list}" var="student">
        <tr>
                <%--<td scope="row"><%=stu.getName()%>
                </td>
                <td><%=stu.getStuId()%>
                </td>
                <td><%=stu.getClazz()%>
                </td>--%>
            <td scope="row">${student.name}
            </td>
            <td>${student.stuId}
            </td>
            <td>${student.clazz}
            </td>
            <td>${student.sex}
            </td>
            <td>${student.age}
            </td>
            <td>${student.major}
            </td>
            <td>${student.kind}
            </td>
        </tr>
    </c:forEach>

    </tbody>
</table>

</body>
</html>

